package com.springbootinit.datasource;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springbootinit.model.entity.Picture;
import com.springbootinit.service.PictureService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class PictureDataSource implements DataSource<Picture>{
    @Resource
    private PictureService pictureService;
    @Override
    public Page<Picture> doSearch(String searchText, long current, long pageSize) {

        return pictureService.searchPicture(searchText, current, pageSize);
    }
}
